# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
maintainer="Will Sinatra <wpsinatra@gmail.com>"
pkgname=xfel
pkgver=1.3.2
pkgrel=0
pkgdesc="Tiny FEL tools for allwinner SOC, support RISC-V D1 chip."
url="https://github.com/xboot/xfel"
license="MIT"
arch="all !s390x"
depends="libusb-dev"
subpackages="$pkgname-doc $pkgname-udev-rules:udev_rules:noarch"
source="xfel-$pkgver.tar.gz::https://github.com/xboot/xfel/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # No tests defined

build() {
	make
}

package() {
	install -Dm0755 "$builddir"/xfel "$pkgdir/usr/bin/xfel"
	install -Dm0644 "$builddir"/LICENSE "$pkgdir/usr/share/licenses/xfel/LICENSE"
}

udev_rules() {
	pkgdesc="udev rules for xfel"
	install -Dm0644 "$builddir"/99-xfel.rules "$subpkgdir/etc/udev/rules.d/99-xfel.rules"
}
sha512sums="
ea49238e1303f3fcb9571bf9bbe11a3a1382bbf244248d00a2dab02cb4e398c293d6be4e7edbb513522ed30e6bce09bf038d58c096c9c42101dfaa641efbdd6d  xfel-1.3.2.tar.gz
"
